<template>
    <div class="indent" @click="hideDelete">
        <div class="indent-header bt bb">全部订单</div>
        <div class="indent-list bb">
            <div class="indent-item" v-for="indent in listUserOrder">
                <div class="indent-item-header clear">
                    <span class="indent-number left">{{indent.orderNo}}</span>
                    <span class="indent-status right">{{indent.orderStatus}}</span>
                </div>
                <div class="indent-item-body">
                    <div class="indent-car">{{indent.brand}} {{indent.model}} {{indent.licensePlate}}<span class="indent-store"> ({{indent.storeName}})</span></div>
                    <div class="indent-details">{{indent.detailName}}</div>
                </div>
                <div class="indent-item-footer clear">
                    <div class="indent-item-total left">合计: ￥{{indent.apAmt}}</div>
                    <div class="indent-item-time right">{{indent.settlementTime}}</div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default{
    name: 'clientDetailsIndent',
    props: {
        hideDelete: Function
    },
    data: function () {
        return {
            listUserOrder: [],
            userId: '11121'
        }
    },
    created(){
        this.$http.get('/mobile/storeManagement/listUserOrder?userId=' + this.userId).then(function (res) {
            res = res.body;
            if(res.code == 0){
                res = res.result;
                this.listUserOrder = res;
            }else {
                console.warn(res.code);
            }
        }, function (err) {
            console.warn('错误码'+ err.status);
        });
    }
}
</script>
<style lang="scss" scoped>
    @import "../../assets/css/common.scss";
    .indent-header{
        height:rem(40);
        line-height:rem(16);
        font-size: rem(14);
        color: #666;
        padding: rem(12);
    }
    .indent-list{
        .indent-item{
            margin-bottom: rem(14);
        }
        .indent-item-header, .indent-item-footer{
            font-size: rem(14);
            height:rem(16);
            line-height:rem(16);
            padding: rem(12);
        }
        .indent-item-body{
            background-color: #aaaaaa;
            color: #666;
            height:rem(40);
            line-height:rem(20);
            font-size: rem(12);
        }
        .indent-item-header, .indent-item-footer{
            font-size: rem(14);
            height:rem(44);
            line-height:rem(16);
            padding: rem(12);
            background-color: #fff;
        }
        .indent-item-body{
            background-color: #fbfbfb;
            color: #333;
            height:rem(67);
            line-height:rem(24);
            font-size: rem(14);
            padding: rem(10) rem(12);
        }
        .indent-item-time{
            font-size: rem(12);
            color: #a68f88;
        }
    }
</style>
